package cn.tutu.shop.entity;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotBlank;

import cn.tutu.blockchain.base.BaseObject;

public class OrderItem extends BaseObject {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2356580156952044603L;
	@NotBlank(message = "商品ID不能为空!")
	private String productId;
	private String orderId;
	@NotNull(message = "数量不能为空!")
	private Integer count;

	private Double totalPrice;
	@NotBlank(message = "用户ID不能为空!")
	private String userId;

	// 展示字段
	private String productName;
	@NotNull(message = "商品单价不能为空!")
	private Double productPrice;
	private String productDis;
	private String productImg;
	private Product product;

	public String getProductId() {
		return productId;
	}

	public void setProductId(String productId) {
		this.productId = productId;
	}

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}

	public Double getTotalPrice() {
		return totalPrice;
	}

	public void setTotalPrice(Double totalPrice) {
		this.totalPrice = totalPrice;
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public Double getProductPrice() {
		return productPrice;
	}

	public void setProductPrice(Double productPrice) {
		this.productPrice = productPrice;
	}

	public String getProductDis() {
		return productDis;
	}

	public void setProductDis(String productDis) {
		this.productDis = productDis;
	}

	public String getProductImg() {
		return productImg;
	}

	public void setProductImg(String productImg) {
		this.productImg = productImg;
	}

}
